Optimal. Leaf size=69 \[ -\frac{a^2 \sin ^3(c+d x)}{5 d}+\frac{3 a^2 \sin (c+d x)}{5 d}-\frac{2 i \cos ^5(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{5 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0491498, antiderivative size = 69, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.083, Rules used = {3496, 2633} \[ -\frac{a^2 \sin ^3(c+d x)}{5 d}+\frac{3 a^2 \sin (c+d x)}{5 d}-\frac{2 i \cos ^5(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{5 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3496
Rule 2633
Rubi steps
\begin{align*} \int \cos ^5(c+d x) (a+i a \tan (c+d x))^2 \, dx &=-\frac{2 i \cos ^5(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{5 d}+\frac{1}{5} \left (3 a^2\right ) \int \cos ^3(c+d x) \, dx\\ &=-\frac{2 i \cos ^5(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{5 d}-\frac{\left (3 a^2\right ) \operatorname{Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{5 d}\\ &=\frac{3 a^2 \sin (c+d x)}{5 d}-\frac{a^2 \sin ^3(c+d x)}{5 d}-\frac{2 i \cos ^5(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{5 d}\\ \end{align*}
Mathematica [A] time = 0.401438, size = 72, normalized size = 1.04 \[ \frac{a^2 (\sin (2 (c+d x))-i \cos (2 (c+d x))) (-5 i \sin (c+d x)+3 i \sin (3 (c+d x))+10 \cos (c+d x)-2 \cos (3 (c+d x)))}{20 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.057, size = 91, normalized size = 1.3 \begin{align*}{\frac{1}{d} \left ( -{a}^{2} \left ( -{\frac{\sin \left ( dx+c \right ) \left ( \cos \left ( dx+c \right ) \right ) ^{4}}{5}}+{\frac{ \left ( 2+ \left ( \cos \left ( dx+c \right ) \right ) ^{2} \right ) \sin \left ( dx+c \right ) }{15}} \right ) -{\frac{2\,i}{5}}{a}^{2} \left ( \cos \left ( dx+c \right ) \right ) ^{5}+{\frac{{a}^{2}\sin \left ( dx+c \right ) }{5} \left ({\frac{8}{3}}+ \left ( \cos \left ( dx+c \right ) \right ) ^{4}+{\frac{4\, \left ( \cos \left ( dx+c \right ) \right ) ^{2}}{3}} \right ) } \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.07611, size = 107, normalized size = 1.55 \begin{align*} -\frac{6 i \, a^{2} \cos \left (d x + c\right )^{5} -{\left (3 \, \sin \left (d x + c\right )^{5} - 5 \, \sin \left (d x + c\right )^{3}\right )} a^{2} -{\left (3 \, \sin \left (d x + c\right )^{5} - 10 \, \sin \left (d x + c\right )^{3} + 15 \, \sin \left (d x + c\right )\right )} a^{2}}{15 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.10349, size = 169, normalized size = 2.45 \begin{align*} \frac{{\left (-i \, a^{2} e^{\left (6 i \, d x + 6 i \, c\right )} - 5 i \, a^{2} e^{\left (4 i \, d x + 4 i \, c\right )} - 15 i \, a^{2} e^{\left (2 i \, d x + 2 i \, c\right )} + 5 i \, a^{2}\right )} e^{\left (-i \, d x - i \, c\right )}}{40 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.981247, size = 155, normalized size = 2.25 \begin{align*} \begin{cases} \frac{\left (- 512 i a^{2} d^{3} e^{6 i c} e^{5 i d x} - 2560 i a^{2} d^{3} e^{4 i c} e^{3 i d x} - 7680 i a^{2} d^{3} e^{2 i c} e^{i d x} + 2560 i a^{2} d^{3} e^{- i d x}\right ) e^{- i c}}{20480 d^{4}} & \text{for}\: 20480 d^{4} e^{i c} \neq 0 \\\frac{x \left (a^{2} e^{6 i c} + 3 a^{2} e^{4 i c} + 3 a^{2} e^{2 i c} + a^{2}\right ) e^{- i c}}{8} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.28452, size = 828, normalized size = 12. \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]